// 基于template/src/widgets/\{{appEntities}}/\{{ctrls@KANBAN}}-kanban/\{{spinalCase ctrl.codeName}}-kanban-model.ts.hbs生成
import { IDataViewCtrlModel } from "@/core";

//  获取列表模型
function getModel(): IDataViewCtrlModel {
  return {
    cssName: "{{#if ctrl.psSysCss}}{{ctrl.psSysCss.cssName}}{{/if}}",         
    aggMode: '{{ctrl.aggMode}}',
    caption: '{{ctrl.caption}}',
    controlType: '{{ctrl.controlType}}',
    codeName: '{{ctrl.codeName}}',
    entityCodeName: '{{ctrl.psAppDataEntity.codeName}}',
    entityLogicName: '{{ctrl.psAppDataEntity.logicName}}',
{{#and ctrl.enableGroup (neq ctrl.groupMode 'NONE')}}
    enableGroup: true,
    //  请确保此项与表格分组列模型中的dataIndex一致
    groupDataIndex: 'grid_group',
    groupMode: '{{ctrl.groupMode}}',
    groupField: '{{lowerCase ctrl.groupPSAppDEField.codeName}}',
  {{#eq ctrl.groupMode 'CODELIST'}}
    groupCodeListTag: '{{ctrl.groupPSCodeList.codeListTag}}',
  {{/eq}}
{{/and}}
    name: '{{ctrl.name}}',
    noSort: {{ctrl.noSort}},
    showHeader: {{#if ctrl.hideHeader}}false{{else}}true{{/if}},
    sortDir: '{{ctrl.minorSortDir}}',
    sortField: '{{#if ctrl.minorSortPSAppDEField}}{{lowerCase ctrl.minorSortPSAppDEField.codeName}}{{/if}}',
    singleSelect:{{#if ctrl.singleSelect}}true{{else}}false{{/if}},
{{#if ctrl.psDEDataImport}}
    dataImport: {
      codeName: '{{ctrl.psDEDataImport.codeName}}',
      ignoreError: {{ctrl.psDEDataImport.ignoreError}},
    },
{{/if}}
    paging: {
      defaultPageSize: {{#if ctrl.pagingSize}}{{ctrl.pagingSize}}{{else}}20{{/if}}
    }
  };
}

export const model = getModel();